/*******************************************************************************
 * Copyright (c) 2010, 2030 www.itlaobing.cn
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 *******************************************************************************/
package cn.itlaobing.one;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;


/** 
 * ClassName: ReadImage <br/> 
 * Function:  <br/> 
 * date: 2017年10月30日 下午9:03:43 <br/> 
 * 
 * @author 苏积钰 
 * @version  
 * @since JDK 1.8 
 */
public class ReadImage {
	public static void  getImage()throws IOException{
		URL url=new URL("http://image.baidu.com/search/detail?ct=503316480&z=undefined&tn=baiduimagedetail&ipn=d&word=%E9%9D%9E%E4%B8%BB%E6%B5%81%E5%9B%BE%E7%89%87&step_word=&ie=utf-8&in=&cl=2&lm=-1&st=-1&cs=458471956,2995807037&os=2255877007,2739109154&simid=0,0&pn=14&rn=1&di=90225070210&ln=1983&fr=&fmq=1509368838684_R&fm=rs8&ic=undefined&s=undefined&se=&sme=&tab=0&width=undefined&height=undefined&face=undefined&is=0,0&istype=0&ist=&jit=&bdtype=0&spn=0&pi=0&gsm=0&oriquery=%E5%9B%BE%E7%89%87&objurl=http%3A%2F%2Fimg.7139.com%2Ffile%2F201207%2F13%2F1fffb657d4e862d1029fe1e9aad8eed4.jpg&rpstart=0&rpnum=0&adpicid=0&ctd=1509368848385^3_1349X660%1");
		BufferedReader br=new BufferedReader(new InputStreamReader(url.openStream()));
		List<String> list=new ArrayList<String>();
		String s="http://img.7139.com/file/201207/13/1fffb657d4e862d1029fe1e9aad8eed4.jpg";
		Pattern p=Pattern.compile(s);
		String line=null;
		while((line=br.readLine())!=null)
		{
			Matcher m=p.matcher(line);
			while(m.find())
			{
				s=line;
				System.out.println(line);
			}
			
		}
		
	}
	public static void main(String[] args) {
		try {
			getImage();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
